package com.dailyblue.example.springcloud.sentinel.consumer.feign;

import com.dailyblue.example.springcloud.commons.util.JsonResult;
import com.dailyblue.example.springcloud.sentinel.consumer.feign.fallback.SentinelProviderFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "cloud-example-sentinel-provider", fallback = SentinelProviderFeignFallback.class)
public interface SentinelProviderFeign {

    @GetMapping("/sentinel_provider/a")
    JsonResult a();

    @GetMapping("/sentinel_provider/b")
    JsonResult b();

    @GetMapping("/sentinel_provider/c")
    JsonResult c();

    @GetMapping("/sentinel_provider/h/{index}")
    JsonResult h(@PathVariable("index") int index);
}
